Help Contents

Click a topic listed below to see information about that topic. Read Essentials if you are new to WinSight or new to this version of WinSight. If you need information on using the Help system, return to the Help menu and choose Using Help.

	Essentials and concepts you'll need to know for working with WinSight, including what messages WinSight traces.
	Tasks and procedures you need to know when using WinSight.
	Menu Commands.

Shortcut: Use the Search button at the top of this Help window if you're ready to look for something by name.


Essentials

What you need to know to use WinSight

Controlling the WinSight desktop

Messages tracked by WinSight

Using the Keyboard

Using the Mouse

Using WinSight


Tasks

Choosing panes (Class List, Window Tree, Message Trace) for display

Choosing which messages to trace

Controlling the WinSight desktop

Displaying, expanding, or collapsing Window Tree pane entries

Displaying window details

Seeing what messages WinSight tracks

Locating Windows

Tracing Messages

Turning real-time updating of panes on and off

Using the Mouse

Using the Keyboard

Using WinSight

Understanding the Window Tree pane format

Understanding the Class List pane format

Understanding the Message Trace pane format


Using the mouse

Here's a list of actions and mouse and menu equivalents.

Desired action	With the mouse	With menus

Select an item	Left click

Toggle highlighted item	Ctrl+left click

Show details of item	Left double-click	Spy|Open Detail

Expand window tree	Right click on <+>	Tree|Expand Branch

Left click on <+>	Tree|Expand One Level

Collapse window tree	Left click on <->	Tree|CollapseBranch

You can also use the mouse to resize the WinSight window or the panes.


Using the keyboard

Here's a list of actions and keyboard and menu equivalents.

Desired action	With the keyboard	With menus

Select an item	Up or down arrow

Move selection bar	Ctrl+up or down arrow

Toggle highlighted item	Spacebar

Expand one level	+	Tree|Expand One Level

Expand branch	*	Tree|Expand Branch

Expand tree completely	Ctrl+*	Tree|Expand All

Collapse branch	-	Tree|Collapse Branch

The right and left arrows scroll horizontally.

Use Tab or F6 to move the focus between panes. Use Shift+Tab or Shift+F6 to switch the focus in the opposite direction.


Using WinSight summary
Using WinSight

WinSight is a tool that gives you information about window classes, windows, and messages. You can use it to study how any application creates classes and windows, and to see how windows send and receive messages.

When you use WinSight to study applications, you use the Window Tree pane.

To use WinSight to watch which Windows messages get sent to which windows, you:

find the window(s) you want to watch

trace the messages that get sent.


Finding windows

WinSight has a special mode, Find Window mode, for locating windows.

You use Spy|Find Window to enter Find Window mode.


Find Window mode

Find Window mode locates windows.

When you're in this mode, WinSight:

identifies the line in the Window Tree pane that corresponds to a window you point at with your mouse, or

highlights the windows that corresponds to the entry you select in the Window Tree pane.

Once you've located the window you want, you leave Find Window mode by clicking the mouse button, or by pressing Escape. This removes the border from the screen and leaves the current window selected in the Window Tree pane. (If you press Enter, you'll see the Window Detail window.)


Tracing messages

Once you've located the window (s) you want to trace messages for in the Window Tree pane, you can trace messages going to that window.

You can trace messages for a selected window or windows, for all windows, or for entire classes of windows. Use the Messages menu to configure message tracing.


WinSight menu commands (summary)
WinSight Menu Commands

Here's a list of the menus and menu commands in WinSight. The menus are listed in the order they appear.

Control menu

Restore

Move

Size

Minimize

Maximize

Close

Switch to

Spy menu

Open Detail

Find Window

Exit

View menu

Class List

Window Tree

Message Trace

Split Horizontal

Split Vertical

Tree menu

Expand One Level

Expand Branch

Expand All

Collapse Branch

Messages menu

Trace Off

Selected Classes

Selected Windows

All Windows

Clear

Options...

Stop! and Start!

Help menu

Index

Finding Windows

Tracing Messages

Menu Commands

Keyboard

Mouse

Using Help

About WinSight


Spy menu

The Spy menu is where you display more details for a window, locate the window for which you want to trace messages, or exit WinSight.

The Spy menu commands are

Open Detail

Find Window

Exit


Spy|Open Detail

Use Spy|Open Detail to display more detail about the selected class or window.

When you choose this command, you'll see either the Class Detail window or the Window Detail window.  The window that's displayed depends on the current active pane, indicated by the dotted rectangle. Additional information about the details present in the Open Detail windows is available in the Object Windows Programming Guide.


Spy|Find Window

Use Spy|Find Window to locate the window for which you want to trace messages. When you choose this command, you enter Find Window mode.


Spy|Exit

Use Spy|Exit to exit WinSight.


View menu

The View menu is where you choose what panes WinSight displays in its main window and how they are displayed.

Here are the View commands.

Class List

Window Tree

Message Trace

Split Horizontal

Split Vertical


Window panes summary
WinSight panes

WinSight can display three panes within its main window.

Class List

Window Tree

Message Trace

WinSight automatically tiles the panes within the main window. You can choose to look at any or all of the panes. You can also resize them.


View|Class List

You use the View|Class List command to display the Class List pane.

This command is a toggle. If the Class List pane is displayed, choosing this command hides the pane.

Note: the term "class" refers to the class name with which the window class was registered with Windows via the RegisterClass API function. It does not refer to C++ classes.


Class List pane

The Class List pane shows all the currently registered window classes.

You can see more information about a window class by double-clicking the window class in the Class List pane, by selecting the window class and pressing Enter, or by selecting it and choosing Spy|Open Detail. You'll see the Class Detail window.

See Also

Class List pane format


Class List pane format

Here's the format of the Class List pane:

Class (Module) Function Styles

Class	The name of the window class. Some predefined Windows classes have numeric names. These classes are shown with the number and a name.

The diamond next to each window class shows whether the window class has any children. If it is hollow, there are no children. The diamonds invert color momentarily when the window receives a message.

If the diamond contains a plus sign, there are children but they are hidden. To expand and see the children, click on the diamond, or select the window and press +. To expand to show all levels of child windows select a window and click with the right mouse button.

If it contains a minus sign, there are children and they are visible. To hide the children again, click on the diamond, or select the parent window and press -.

Module	The name of the executable module (.EXE or .DLL) that registered the class.

Function 	The address of the class window function.

Styles 	A list of the CS_ styles for the class. The names are the same as the CS_xxxxxx definitions in WINDOWS.H, except that the CS_ is removed and the name is in mixed case.


Class Detail window

The Class Detail window shows detailed information about the selected window class. Information about the additional information in the Detail window can be found in the Object Windows Programming Guide.


View|Window Tree

You use the View|Window Tree command to display the Window Tree pane.

This command is a toggle. If the Window Tree pane is displayed, choosing this command hides the pane.


Window Tree pane

The Window Tree pane displays the hierarchy of windows on the desktop. This is the default display.

You can use this display to:

determine what windows are actually present

see the status of windows, including hidden windows

see which windows are receiving messages

select the windows you want to trace messages for.

You can see more information about a window by double-clicking the window item in the pane, selecting the window item and pressing Enter, or by selecting it and choosing Spy|Open Detail. You'll see the Window Detail window.

See Also

Window Tree pane format


Window Tree pane format

Here's the format of the Window Tree pane:

Tree Handle {Class} Module Position "Title"

Tree	The lines on the left of the pane show the window tree structure. Each window is connected to its parent, siblings, and children.

The diamond next to each window class shows whether the window class has any children. If it is hollow, there are no children. The diamonds invert color momentarily when the window receives a message.

If the diamond contains a plus sign, there are children but they are hidden. To expand and see the children, click on the diamond, or select the window and press +. To expand to show all levels of child windows select a window and click with the right mouse button.

If it contains a minus sign, there are children and they are visible. To hide the children again, click on the diamond, or select the parent window and press -.

If a window has child windows that are collapsed out of the tree display, that window's diamond shows message activity for the collapsed children.

Handle	The window handle as returned by CreateWindow.

Class	The name of the window class. Some predefined Windows classes have numeric names. These classes are shown with the number and a name.

Module	The name of the executable module (.EXE or .DLL) that created the window.

Position	The window's position. If the window is hidden, the text "(hidden)" is displayed. If it is visible, (xBegin,yBegin)-(xEnd,yEnd) is displayed. For top-level windows, these are screen coordinates. For child windows, they are coordinates within the parent window's client area.

Title	The window title or text, as returned by GetWindowText or a WM_GETTEXT message. If the title is the null string, the quotes are omitted.


Window Detail window

The Window Detail window shows detailed information about the selected window in addition to information about the window's class.


View|Message Trace

You use the View|Message Trace command to display the Message Trace pane.

This command is a toggle. If the Message Trace pane is displayed, choosing this command hides the pane.


Message Trace pane

The Message Trace pane displays information about messages received by selected windows or windows classes.

Messages received via SendMessage are shown twice, once when they are sent and again when they return. Dispatched messages are shown once only, since their return value is meaningless. The message display is indented to show how messages are nested within other messages.

See Also

Message Trace pane format


Message Trace pane format

Here is the format of the Message Trace pane:

Handle "Title"-or-{Class} Message Status ...

Handle	The window handle receiving the message.

Title	The window's title. If the title is a null string, the class name is displayed in curly braces.

Message	The message name as defined in WINDOWS.H. Known undocumented Windows messages are shown in lower case.

Unknown message numbers (user-defined) are shown as: WM_USER+0xXXXX if they are greater than or equal to WM_USER  or WM_0xXXXX if they are less than WM_USER.

Registered message numbers (from RegisterWindowsMessage) are shown with their registered name in single quotes.

Status	One or more of:

Dispatched	The message was received via DispatchMessage

Sent [from XXXX]	The message was received via SendMessage. If it was sent from another window, "from XXXX" gives that window's handle. If it was sent from the same window receiving it, this is shown with "from self". If it was sent from Windows itself, the "from" phrase is omitted.

Returns	The message was received via SendMessage and is now returning.

...	Additional information specific to each message.

If a returning message, the return value, either in numeric form, or with more specific information for messages such as WM_GETTEXT.

If a sent and dispatched message, the message parameters. WinSight interprets the parameters to give a readable display. If a message has associated data structures, those structures are included in the display.


View|Split Horizontal

Use View|Split Horizontal to stack the panes on top of one another.


View|Split Vertical

Use View|Split Vertical to display the panes side by side.


Tree menu

You use the Tree menu to display, expand, or collapse window entries in the Window Tree pane.

Here are the Tree menu commands.

Expand One Level

Expand Branch

Expand All

Collapse Branch


Tree|Expand One Level
Tree|Expand One Level (+)

Use Tree|Expand One Level to expand an entry one level in the Window Tree pane.

A plus sign in the diamond next to an entry indicates that the window has children but they are hidden.

When a window has more than one level of child windows, you can use this command repeatedly to show additional levels.


Tree|Expand Branch
Tree|Expand Branch (*)

Use Tree|Expand Branch to expand an entire branch in the Window Tree pane.

A plus sign in the diamond next to an entry indicates that the window has children but they are hidden.


Tree|Expand All
Tree|Expand All (Ctrl+*)

Use Tree|Expand All to expand all entries that are collapsed in the Window Tree pane.


Tree|Collapse Branch